import request from '@/utils/request'

// 查询故障记录列表
export function listLog(query) {
  return request({
    url: '/sys/log/list',
    method: 'get',
    params: query
  })
}

// 查询故障记录详细
export function getLog(faultLogId) {
  return request({
    url: '/sys/log/' + faultLogId,
    method: 'get'
  })
}

// 新增故障记录
export function addLog(data) {
  return request({
    url: '/sys/log',
    method: 'post',
    data: data
  })
}

// 修改故障记录
export function updateLog(data) {
  return request({
    url: '/sys/log',
    method: 'put',
    data: data
  })
}

// 删除故障记录
export function delLog(faultLogId) {
  return request({
    url: '/sys/log/' + faultLogId,
    method: 'delete'
  })
}

export function sendLog(logg) {
  return request({
    url: '/sys/log/' + logg,
    method: 'post'
  })
}

// export const sendLog = (msg) => {
//   return service({
//     url: '/sys/log/'+msg,
//     method: 'post',
//     data:msg
//   })
// };

